package Basic9;

public class J16_OOP_Q73 {

	public static void main(String[] args) {


		// 상속, 인터페이스, 기본클래스를 이용해서 Fan상태를 출력하는 프로그램 작성
		J16_Motor_Fan mf =new J16_Motor_Fan(3, true, 10, "yellow");
		J16_Motor_Fan mf2 =new J16_Motor_Fan(2, false, 5, "blue");
		
		System.out.println(mf.toString());
		System.out.println(mf2.toString());
		
		
		
	}// main

}// class

interface J16_Fan_Service {
	int SLOW = 1;
	int MEDIUM = 2;
	int FAST = 3;

}




class J16_Fan implements J16_Fan_Service{

	/*
	 * private final int SLOW=1; 
	 * private final int MEDIUM=2; 
	 * private final int FAST=3;
	 */

	private int speed;
	private boolean on;
	private double redius;
	private String color;

	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}

	public boolean isOn() {
		return on;
	}

	public void setOn(boolean on) {
		this.on = on;
	}

	public double getRedius() {
		return redius;
	}

	public void setRedius(double redius) {
		this.redius = redius;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public J16_Fan(int speed, boolean on, double redius, String color) {
		super();
		this.speed = speed;
		this.on = on;
		this.redius = redius;
		this.color = color;
	}

	@Override
	public String toString() {
		return "J16_Fan [speed=" + speed + ", on=" + on + ", redius=" + redius
				+ ", color=" + color + "]";
	}

}// J16_Fan


class J16_Motor_Fan extends J16_Fan{
	public J16_Motor_Fan(int s, boolean o, double r, String c) {
	super (s,o,r,c);
	
	}
	
}

